(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
power(x', S(x)) → mult(x', power(x', x))
mult(x', S(x)) → add0(x', mult(x', x))
add0(x', S(x)) → +(S(0), add0(x', x))
power(x, 0) → S(0)
mult(x, 0) → 0
add0(x, 0) → x
The (relative) TRS S consists of the following rules:
+(x, S(0)) → S(x)
+(S(0), y) → S(y)
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
power(x', S(x)) → mult(x', power(x', x))
mult(x', S(x)) → add0(x', mult(x', x))
add0(x', S(x)) → +'(S(0'), add0(x', x))
power(x, 0') → S(0')
mult(x, 0') → 0'
add0(x, 0') → x
The (relative) TRS S consists of the following rules:
+'(x, S(0')) → S(x)
+'(S(0'), y) → S(y)
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
power(x', S(x)) → mult(x', power(x', x))
mult(x', S(x)) → add0(x', mult(x', x))
add0(x', S(x)) → +'(S(0'), add0(x', x))
power(x, 0') → S(0')
mult(x, 0') → 0'
add0(x, 0') → x
+'(x, S(0')) → S(x)
+'(S(0'), y) → S(y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
power,
mult,
add0They will be analysed ascendingly in the following order:
mult < power
add0 < mult
(6) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
The following defined symbols remain to be analysed:
add0, power, mult
They will be analysed ascendingly in the following order:
mult < power
add0 < mult
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
add0(
gen_S:0'2_1(
1),
gen_S:0'2_1(
n4_1)) →
gen_S:0'2_1(
+(
1,
n4_1)), rt ∈ Ω(1 + n4
1)
Induction Base:
add0(gen_S:0'2_1(1), gen_S:0'2_1(0)) →RΩ(1)
gen_S:0'2_1(1)
Induction Step:
add0(gen_S:0'2_1(1), gen_S:0'2_1(+(n4_1, 1))) →RΩ(1)
+'(S(0'), add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1))) →IH
+'(S(0'), gen_S:0'2_1(+(1, c5_1))) →RΩ(0)
S(gen_S:0'2_1(+(1, n4_1)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
The following defined symbols remain to be analysed:
mult, power
They will be analysed ascendingly in the following order:
mult < power
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
mult(
gen_S:0'2_1(
1),
gen_S:0'2_1(
n487_1)) →
gen_S:0'2_1(
n487_1), rt ∈ Ω(1 + n487
1 + n487
12)
Induction Base:
mult(gen_S:0'2_1(1), gen_S:0'2_1(0)) →RΩ(1)
0'
Induction Step:
mult(gen_S:0'2_1(1), gen_S:0'2_1(+(n487_1, 1))) →RΩ(1)
add0(gen_S:0'2_1(1), mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1))) →IH
add0(gen_S:0'2_1(1), gen_S:0'2_1(c488_1)) →LΩ(1 + n4871)
gen_S:0'2_1(+(1, n487_1))
We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
The following defined symbols remain to be analysed:
power
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
power(
gen_S:0'2_1(
1),
gen_S:0'2_1(
n780_1)) →
gen_S:0'2_1(
1), rt ∈ Ω(1 + n780
1)
Induction Base:
power(gen_S:0'2_1(1), gen_S:0'2_1(0)) →RΩ(1)
S(0')
Induction Step:
power(gen_S:0'2_1(1), gen_S:0'2_1(+(n780_1, 1))) →RΩ(1)
mult(gen_S:0'2_1(1), power(gen_S:0'2_1(1), gen_S:0'2_1(n780_1))) →IH
mult(gen_S:0'2_1(1), gen_S:0'2_1(1)) →LΩ(3)
gen_S:0'2_1(1)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(14) Complex Obligation (BEST)
(15) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
power(gen_S:0'2_1(1), gen_S:0'2_1(n780_1)) → gen_S:0'2_1(1), rt ∈ Ω(1 + n7801)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(16) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
(17) BOUNDS(n^2, INF)
(18) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
power(gen_S:0'2_1(1), gen_S:0'2_1(n780_1)) → gen_S:0'2_1(1), rt ∈ Ω(1 + n7801)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(19) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
(20) BOUNDS(n^2, INF)
(21) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
mult(gen_S:0'2_1(1), gen_S:0'2_1(n487_1)) → gen_S:0'2_1(n487_1), rt ∈ Ω(1 + n4871 + n48712)
(23) BOUNDS(n^2, INF)
(24) Obligation:
Innermost TRS:
Rules:
power(
x',
S(
x)) →
mult(
x',
power(
x',
x))
mult(
x',
S(
x)) →
add0(
x',
mult(
x',
x))
add0(
x',
S(
x)) →
+'(
S(
0'),
add0(
x',
x))
power(
x,
0') →
S(
0')
mult(
x,
0') →
0'add0(
x,
0') →
x+'(
x,
S(
0')) →
S(
x)
+'(
S(
0'),
y) →
S(
y)
Types:
power :: S:0' → S:0' → S:0'
S :: S:0' → S:0'
mult :: S:0' → S:0' → S:0'
add0 :: S:0' → S:0' → S:0'
+' :: S:0' → S:0' → S:0'
0' :: S:0'
hole_S:0'1_1 :: S:0'
gen_S:0'2_1 :: Nat → S:0'
Lemmas:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
Generator Equations:
gen_S:0'2_1(0) ⇔ 0'
gen_S:0'2_1(+(x, 1)) ⇔ S(gen_S:0'2_1(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
add0(gen_S:0'2_1(1), gen_S:0'2_1(n4_1)) → gen_S:0'2_1(+(1, n4_1)), rt ∈ Ω(1 + n41)
(26) BOUNDS(n^1, INF)